import "./assets/main.css";

import { createApp } from "vue";
import { createPinia } from "pinia";

// Element Plus 按需引入
import {
  ElButton,
  ElMessage,
  ElContainer,
  ElHeader,
  ElMain,
  ElProgress,
} from "element-plus";
import "element-plus/theme-chalk/el-button.css";
import "element-plus/theme-chalk/el-message.css";
import "element-plus/theme-chalk/el-container.css";
import "element-plus/theme-chalk/el-header.css";
import "element-plus/theme-chalk/el-main.css";
import "element-plus/theme-chalk/el-progress.css";

import App from "./App.vue";
import router from "./router";

const app = createApp(App);

app.use(createPinia());
app.use(router);

// 注册 Element Plus 组件
app.component("ElButton", ElButton);
app.component("ElContainer", ElContainer);
app.component("ElHeader", ElHeader);
app.component("ElMain", ElMain);
app.component("ElProgress", ElProgress);

// 全局配置 ElMessage
app.config.globalProperties.$message = ElMessage;

app.mount("#app");
